import request from '@/utils/request'

// 查询生产子表列表
function list(query) {
  return request({
    url: '/business/produces/list',
    method: 'get',
    params: query
  })
}

// 保存生产子表
function save(data) {
  return request({
    url: '/business/produces/save',
    method: 'post',
    data: data
  })
}

// 删除生产子表
export function del(id) {
  return request({
    url: '/business/produces/delete/' + id,
    method: 'delete'
  })
}

//批量删除生产子表
function batchDel(data) {
  return request({
    url: '/business/produces/batchDel',
    method: 'delete',
    data: data
  })
}

// 根据id获取生产子表详细信息
function findById(id) {
  return request({
    url: '/business/produces/findById/' + id,
    method: 'get'
  })
}

export const produces = {
  list,
  save,
  del,
  batchDel,
  findById
};
